/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Administrator
 * Date: 2024-06-08
 * Time: 21:45
 */

abstract class Shape{
    public int a = 10;
    public abstract void draw();

    public void test(){

    }
}

class Rest extends  Shape{
    @Override
    public void draw() {
        System.out.println("矩形");
    }
}

class Circle extends Shape{
    @Override
    public void draw() {
        System.out.println("圆形");
    }
}

class Flower extends Shape{
    @Override
    public void draw() {
        System.out.println("花朵");
    }
}
public class TestDemo {
    public static void drawMap(Shape shape){
        shape.draw();
    }
    public static void main(String[] args) {
        drawMap(new Rest());
        drawMap(new Circle());
        drawMap(new Flower());
    }
}
